"""
需求： 定义手机类，

    属性：品牌 brand，价格，颜色
    行为：开机，关机，拍照
"""
from datetime import datetime


class Phone:
    def __init__(self,brand,price,color):
        self.brand = brand
        self.price = price
        self.color = color

    def open(self):
        print(f'{self.brand}牌子的手机开机了')

    def close(self):
        print(f'{self.brand}牌子的手机关机了')

    def photograph(self):
        print(f'{self.brand}牌子的手机在拍照')

if __name__ == '__main__':
    p1 = Phone('华为','8600','灰色')
    p1.create_time = datetime.now()

    p1.open()
    p1.photograph()
    p1.close()
    print(f'生产日期:{p1.create_time}')